<?php
/**
 * @version		$Id: controller.php 14974 2010-02-21 14:32:22Z ian $
 * @package		Joomla
 * @subpackage	Contact
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die( 'Restricted access' );

jimport( 'joomla.application.component.controller' );

/**
 * Contact Component Controller
 *
 * @static
 * @package		Joomla
 * @subpackage	Contact
 * @since 1.5
 */
class UpdateservicesController extends JController
{
	/**
	 * Display the view
	 */
	function display()
	{	
		parent::display();
	}
	
	function update(){	
		$user 	=& JFactory::getUser();
		if ( $user->get('guest')) {
			return;	
		}
		$arrfields =  JRequest::getVar( 'CheckboxGroup', array(0), 'post', 'array' );

		//var_dump($arrfields);
		$model = $this->getModel('updateservices');
		$model->saveList($arrfields, $user->id);
		$msg = "";
		$this->setRedirect('index.php?option=com_user&view=user&Itemid=8', $msg);
	}
}
